package com.yuexunit.operationman.nbsy.module.Catheter;

import android.content.Context;
import android.content.res.Resources;

import com.yuexunit.operationman.nbsy.R;
import com.yuexunit.operationman.nbsy.module.Catheter.bean.CatheterBean;

import java.util.ArrayList;

/**
 * Created by work-jx on 2017/12/28.
 */
public class CatheterContracts {
    public static final ArrayList<CatheterBean.ObjectEntity.CatheterItemListEntity> CATHETER_ITEM_LIST_ENTITIES(Context context)
    {
        Resources res =context.getResources();
        String[] languages = res.getStringArray(R.array.catheter);
        ArrayList<CatheterBean.ObjectEntity.CatheterItemListEntity> catheterItemListEntities = new ArrayList<>();
        for(int i = 0; i<languages.length;i++)
        {
            CatheterBean.ObjectEntity.CatheterItemListEntity catheterItemListEntity = new CatheterBean.ObjectEntity.CatheterItemListEntity();
            catheterItemListEntity.setItemCode(languages[i]);
            catheterItemListEntity.setItemValue("");
            catheterItemListEntity.setItemName("");
            catheterItemListEntity.setCatheterItemId("");
            catheterItemListEntity.setCatheterId("");
            catheterItemListEntities.add(catheterItemListEntity);
        }
        return catheterItemListEntities;
    };


    public static final ArrayList<CatheterBean.ObjectEntity.CatheterItemListEntity> CATHETER_ITEM_LIST_ENTITIES_NEW(Context context)
    {
        Resources res =context.getResources();
        String[] languages = res.getStringArray(R.array.catheter);
        ArrayList<CatheterBean.ObjectEntity.CatheterItemListEntity> catheterItemListEntities = new ArrayList<>();
        for(int i = 0; i<languages.length;i++)
        {
            CatheterBean.ObjectEntity.CatheterItemListEntity catheterItemListEntity = new CatheterBean.ObjectEntity.CatheterItemListEntity();
            catheterItemListEntity.setItemCode(languages[i]);
            catheterItemListEntity.setItemName("");
            catheterItemListEntity.setCatheterItemId("");
            catheterItemListEntity.setCatheterId("");
            switch (languages[i]) {
                case "DGLX":
                    catheterItemListEntity.setItemValue(";;;");
                    break;
                case "DNMD":
                    catheterItemListEntity.setItemValue(";;;;;;;;");
                    break;
                case "item1":
                    catheterItemListEntity.setItemValue(";;;;");
                    break;
                case "item2":
                    catheterItemListEntity.setItemValue(";;");
                    break;
                case "item3":
                    catheterItemListEntity.setItemValue(";;");
                    break;
                case "item4":
                    catheterItemListEntity.setItemValue(";;;;");
                    break;
                case "item5":
                    catheterItemListEntity.setItemValue(";;");
                    break;
                case "item6":
                    catheterItemListEntity.setItemValue(";;");
                    break;
                case "item7":
                    catheterItemListEntity.setItemValue(";;;;");
                    break;
                case "item8":
                    catheterItemListEntity.setItemValue(";;");
                    break;
                case "item9":
                    catheterItemListEntity.setItemValue(";;");
                    break;
                default:
                    catheterItemListEntity.setItemValue("");
                    break;
            }
            catheterItemListEntities.add(catheterItemListEntity);
        }
        return catheterItemListEntities;
    };

}
